/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this value object you may modify the generated sub-class of this class - VOUserMaster.as.
 */

package com.model.valueObjects
{
import com.adobe.fiber.services.IFiberManagingService;
import com.adobe.fiber.util.FiberUtils;
import com.adobe.fiber.valueobjects.IValueObject;
import flash.events.Event;
import flash.events.EventDispatcher;
import mx.binding.utils.ChangeWatcher;
import mx.events.PropertyChangeEvent;
import mx.validators.ValidationResult;

import flash.net.registerClassAlias;
import flash.net.getClassByAlias;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

use namespace model_internal;

[ExcludeClass]
public class _Super_VOUserMaster extends flash.events.EventDispatcher implements com.adobe.fiber.valueobjects.IValueObject
{
    model_internal static function initRemoteClassAliasSingle(cz:Class) : void
    {
        try
        {
            if (flash.net.getClassByAlias("VOUserMaster") == null)
            {
                flash.net.registerClassAlias("VOUserMaster", cz);
            }
        }
        catch (e:Error)
        {
            flash.net.registerClassAlias("VOUserMaster", cz);
        }
    }

    model_internal static function initRemoteClassAliasAllRelated() : void
    {
    }

    model_internal var _dminternal_model : _VOUserMasterEntityMetadata;

    /**
     * properties
     */
    private var _internal_user_dob : String;
    private var _internal_cre_datetime : String;
    private var _internal_user_image_fk : int;
    private var _internal_emp_id : String;
    private var _internal_serialnumber : int;
    private var _internal_user_email : String;
    private var _internal_cre_userid : int;
    private var _internal_contact_number : String;
    private var _internal_user_name : String;
    private var _internal_user_role : String;
    private var _internal_isactive : Boolean;
    private var _internal_user_designation : String;
    private var _internal_login_name : String;
    private var _internal_activestatus : Boolean;
    private var _internal_user_password : String;
    private var _internal_user_department : String;

    private static var emptyArray:Array = new Array();


    /**
     * derived property cache initialization
     */
    model_internal var _cacheInitialized_isValid:Boolean = false;

    model_internal var _changeWatcherArray:Array = new Array();

    public function _Super_VOUserMaster()
    {
        _model = new _VOUserMasterEntityMetadata(this);

        // Bind to own data properties for cache invalidation triggering
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "user_dob", model_internal::setterListenerUser_dob));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "cre_datetime", model_internal::setterListenerCre_datetime));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "emp_id", model_internal::setterListenerEmp_id));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "user_email", model_internal::setterListenerUser_email));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "contact_number", model_internal::setterListenerContact_number));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "user_name", model_internal::setterListenerUser_name));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "user_role", model_internal::setterListenerUser_role));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "user_designation", model_internal::setterListenerUser_designation));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "login_name", model_internal::setterListenerLogin_name));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "user_password", model_internal::setterListenerUser_password));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "user_department", model_internal::setterListenerUser_department));

    }

    /**
     * data property getters
     */

    [Bindable(event="propertyChange")]
    public function get user_dob() : String
    {
        return _internal_user_dob;
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetime() : String
    {
        return _internal_cre_datetime;
    }

    [Bindable(event="propertyChange")]
    public function get user_image_fk() : int
    {
        return _internal_user_image_fk;
    }

    [Bindable(event="propertyChange")]
    public function get emp_id() : String
    {
        return _internal_emp_id;
    }

    [Bindable(event="propertyChange")]
    public function get serialnumber() : int
    {
        return _internal_serialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get user_email() : String
    {
        return _internal_user_email;
    }

    [Bindable(event="propertyChange")]
    public function get cre_userid() : int
    {
        return _internal_cre_userid;
    }

    [Bindable(event="propertyChange")]
    public function get contact_number() : String
    {
        return _internal_contact_number;
    }

    [Bindable(event="propertyChange")]
    public function get user_name() : String
    {
        return _internal_user_name;
    }

    [Bindable(event="propertyChange")]
    public function get user_role() : String
    {
        return _internal_user_role;
    }

    [Bindable(event="propertyChange")]
    public function get isactive() : Boolean
    {
        return _internal_isactive;
    }

    [Bindable(event="propertyChange")]
    public function get user_designation() : String
    {
        return _internal_user_designation;
    }

    [Bindable(event="propertyChange")]
    public function get login_name() : String
    {
        return _internal_login_name;
    }

    [Bindable(event="propertyChange")]
    public function get activestatus() : Boolean
    {
        return _internal_activestatus;
    }

    [Bindable(event="propertyChange")]
    public function get user_password() : String
    {
        return _internal_user_password;
    }

    [Bindable(event="propertyChange")]
    public function get user_department() : String
    {
        return _internal_user_department;
    }

    /**
     * data property setters
     */

    public function set user_dob(value:String) : void
    {
        var oldValue:String = _internal_user_dob;
        if (oldValue !== value)
        {
            _internal_user_dob = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_dob", oldValue, _internal_user_dob));
        }
    }

    public function set cre_datetime(value:String) : void
    {
        var oldValue:String = _internal_cre_datetime;
        if (oldValue !== value)
        {
            _internal_cre_datetime = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetime", oldValue, _internal_cre_datetime));
        }
    }

    public function set user_image_fk(value:int) : void
    {
        var oldValue:int = _internal_user_image_fk;
        if (oldValue !== value)
        {
            _internal_user_image_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_image_fk", oldValue, _internal_user_image_fk));
        }
    }

    public function set emp_id(value:String) : void
    {
        var oldValue:String = _internal_emp_id;
        if (oldValue !== value)
        {
            _internal_emp_id = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "emp_id", oldValue, _internal_emp_id));
        }
    }

    public function set serialnumber(value:int) : void
    {
        var oldValue:int = _internal_serialnumber;
        if (oldValue !== value)
        {
            _internal_serialnumber = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "serialnumber", oldValue, _internal_serialnumber));
        }
    }

    public function set user_email(value:String) : void
    {
        var oldValue:String = _internal_user_email;
        if (oldValue !== value)
        {
            _internal_user_email = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_email", oldValue, _internal_user_email));
        }
    }

    public function set cre_userid(value:int) : void
    {
        var oldValue:int = _internal_cre_userid;
        if (oldValue !== value)
        {
            _internal_cre_userid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_userid", oldValue, _internal_cre_userid));
        }
    }

    public function set contact_number(value:String) : void
    {
        var oldValue:String = _internal_contact_number;
        if (oldValue !== value)
        {
            _internal_contact_number = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "contact_number", oldValue, _internal_contact_number));
        }
    }

    public function set user_name(value:String) : void
    {
        var oldValue:String = _internal_user_name;
        if (oldValue !== value)
        {
            _internal_user_name = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_name", oldValue, _internal_user_name));
        }
    }

    public function set user_role(value:String) : void
    {
        var oldValue:String = _internal_user_role;
        if (oldValue !== value)
        {
            _internal_user_role = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_role", oldValue, _internal_user_role));
        }
    }

    public function set isactive(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_isactive;
        if (oldValue !== value)
        {
            _internal_isactive = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "isactive", oldValue, _internal_isactive));
        }
    }

    public function set user_designation(value:String) : void
    {
        var oldValue:String = _internal_user_designation;
        if (oldValue !== value)
        {
            _internal_user_designation = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_designation", oldValue, _internal_user_designation));
        }
    }

    public function set login_name(value:String) : void
    {
        var oldValue:String = _internal_login_name;
        if (oldValue !== value)
        {
            _internal_login_name = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "login_name", oldValue, _internal_login_name));
        }
    }

    public function set activestatus(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_activestatus;
        if (oldValue !== value)
        {
            _internal_activestatus = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "activestatus", oldValue, _internal_activestatus));
        }
    }

    public function set user_password(value:String) : void
    {
        var oldValue:String = _internal_user_password;
        if (oldValue !== value)
        {
            _internal_user_password = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_password", oldValue, _internal_user_password));
        }
    }

    public function set user_department(value:String) : void
    {
        var oldValue:String = _internal_user_department;
        if (oldValue !== value)
        {
            _internal_user_department = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "user_department", oldValue, _internal_user_department));
        }
    }

    /**
     * Data property setter listeners
     *
     * Each data property whose value affects other properties or the validity of the entity
     * needs to invalidate all previously calculated artifacts. These include:
     *  - any derived properties or constraints that reference the given data property.
     *  - any availability guards (variant expressions) that reference the given data property.
     *  - any style validations, message tokens or guards that reference the given data property.
     *  - the validity of the property (and the containing entity) if the given data property has a length restriction.
     *  - the validity of the property (and the containing entity) if the given data property is required.
     */

    model_internal function setterListenerUser_dob(value:flash.events.Event):void
    {
        _model.invalidateDependentOnUser_dob();
    }

    model_internal function setterListenerCre_datetime(value:flash.events.Event):void
    {
        _model.invalidateDependentOnCre_datetime();
    }

    model_internal function setterListenerEmp_id(value:flash.events.Event):void
    {
        _model.invalidateDependentOnEmp_id();
    }

    model_internal function setterListenerUser_email(value:flash.events.Event):void
    {
        _model.invalidateDependentOnUser_email();
    }

    model_internal function setterListenerContact_number(value:flash.events.Event):void
    {
        _model.invalidateDependentOnContact_number();
    }

    model_internal function setterListenerUser_name(value:flash.events.Event):void
    {
        _model.invalidateDependentOnUser_name();
    }

    model_internal function setterListenerUser_role(value:flash.events.Event):void
    {
        _model.invalidateDependentOnUser_role();
    }

    model_internal function setterListenerUser_designation(value:flash.events.Event):void
    {
        _model.invalidateDependentOnUser_designation();
    }

    model_internal function setterListenerLogin_name(value:flash.events.Event):void
    {
        _model.invalidateDependentOnLogin_name();
    }

    model_internal function setterListenerUser_password(value:flash.events.Event):void
    {
        _model.invalidateDependentOnUser_password();
    }

    model_internal function setterListenerUser_department(value:flash.events.Event):void
    {
        _model.invalidateDependentOnUser_department();
    }


    /**
     * valid related derived properties
     */
    model_internal var _isValid : Boolean;
    model_internal var _invalidConstraints:Array = new Array();
    model_internal var _validationFailureMessages:Array = new Array();

    /**
     * derived property calculators
     */

    /**
     * isValid calculator
     */
    model_internal function calculateIsValid():Boolean
    {
        var violatedConsts:Array = new Array();
        var validationFailureMessages:Array = new Array();

        var propertyValidity:Boolean = true;
        if (!_model.user_dobIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_user_dobValidationFailureMessages);
        }
        if (!_model.cre_datetimeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_cre_datetimeValidationFailureMessages);
        }
        if (!_model.emp_idIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_emp_idValidationFailureMessages);
        }
        if (!_model.user_emailIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_user_emailValidationFailureMessages);
        }
        if (!_model.contact_numberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_contact_numberValidationFailureMessages);
        }
        if (!_model.user_nameIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_user_nameValidationFailureMessages);
        }
        if (!_model.user_roleIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_user_roleValidationFailureMessages);
        }
        if (!_model.user_designationIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_user_designationValidationFailureMessages);
        }
        if (!_model.login_nameIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_login_nameValidationFailureMessages);
        }
        if (!_model.user_passwordIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_user_passwordValidationFailureMessages);
        }
        if (!_model.user_departmentIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_user_departmentValidationFailureMessages);
        }

        model_internal::_cacheInitialized_isValid = true;
        model_internal::invalidConstraints_der = violatedConsts;
        model_internal::validationFailureMessages_der = validationFailureMessages;
        return violatedConsts.length == 0 && propertyValidity;
    }

    /**
     * derived property setters
     */

    model_internal function set isValid_der(value:Boolean) : void
    {
        var oldValue:Boolean = model_internal::_isValid;
        if (oldValue !== value)
        {
            model_internal::_isValid = value;
            _model.model_internal::fireChangeEvent("isValid", oldValue, model_internal::_isValid);
        }
    }

    /**
     * derived property getters
     */

    [Transient]
    [Bindable(event="propertyChange")]
    public function get _model() : _VOUserMasterEntityMetadata
    {
        return model_internal::_dminternal_model;
    }

    public function set _model(value : _VOUserMasterEntityMetadata) : void
    {
        var oldValue : _VOUserMasterEntityMetadata = model_internal::_dminternal_model;
        if (oldValue !== value)
        {
            model_internal::_dminternal_model = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "_model", oldValue, model_internal::_dminternal_model));
        }
    }

    /**
     * methods
     */


    /**
     *  services
     */
    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagingService):void
    {
        _managingService = managingService;
    }

    model_internal function set invalidConstraints_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invalidConstraints;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_invalidConstraints = value;
            _model.model_internal::fireChangeEvent("invalidConstraints", oldValue, model_internal::_invalidConstraints);
        }
    }

    model_internal function set validationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_validationFailureMessages;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_validationFailureMessages = value;
            _model.model_internal::fireChangeEvent("validationFailureMessages", oldValue, model_internal::_validationFailureMessages);
        }
    }

    model_internal var _doValidationCacheOfUser_dob : Array = null;
    model_internal var _doValidationLastValOfUser_dob : String;

    model_internal function _doValidationForUser_dob(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfUser_dob != null && model_internal::_doValidationLastValOfUser_dob == value)
           return model_internal::_doValidationCacheOfUser_dob ;

        _model.model_internal::_user_dobIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isUser_dobAvailable && _internal_user_dob == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "user_dob is required"));
        }

        model_internal::_doValidationCacheOfUser_dob = validationFailures;
        model_internal::_doValidationLastValOfUser_dob = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfCre_datetime : Array = null;
    model_internal var _doValidationLastValOfCre_datetime : String;

    model_internal function _doValidationForCre_datetime(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfCre_datetime != null && model_internal::_doValidationLastValOfCre_datetime == value)
           return model_internal::_doValidationCacheOfCre_datetime ;

        _model.model_internal::_cre_datetimeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isCre_datetimeAvailable && _internal_cre_datetime == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "cre_datetime is required"));
        }

        model_internal::_doValidationCacheOfCre_datetime = validationFailures;
        model_internal::_doValidationLastValOfCre_datetime = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfEmp_id : Array = null;
    model_internal var _doValidationLastValOfEmp_id : String;

    model_internal function _doValidationForEmp_id(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfEmp_id != null && model_internal::_doValidationLastValOfEmp_id == value)
           return model_internal::_doValidationCacheOfEmp_id ;

        _model.model_internal::_emp_idIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isEmp_idAvailable && _internal_emp_id == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "emp_id is required"));
        }

        model_internal::_doValidationCacheOfEmp_id = validationFailures;
        model_internal::_doValidationLastValOfEmp_id = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfUser_email : Array = null;
    model_internal var _doValidationLastValOfUser_email : String;

    model_internal function _doValidationForUser_email(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfUser_email != null && model_internal::_doValidationLastValOfUser_email == value)
           return model_internal::_doValidationCacheOfUser_email ;

        _model.model_internal::_user_emailIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isUser_emailAvailable && _internal_user_email == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "user_email is required"));
        }

        model_internal::_doValidationCacheOfUser_email = validationFailures;
        model_internal::_doValidationLastValOfUser_email = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfContact_number : Array = null;
    model_internal var _doValidationLastValOfContact_number : String;

    model_internal function _doValidationForContact_number(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfContact_number != null && model_internal::_doValidationLastValOfContact_number == value)
           return model_internal::_doValidationCacheOfContact_number ;

        _model.model_internal::_contact_numberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isContact_numberAvailable && _internal_contact_number == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "contact_number is required"));
        }

        model_internal::_doValidationCacheOfContact_number = validationFailures;
        model_internal::_doValidationLastValOfContact_number = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfUser_name : Array = null;
    model_internal var _doValidationLastValOfUser_name : String;

    model_internal function _doValidationForUser_name(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfUser_name != null && model_internal::_doValidationLastValOfUser_name == value)
           return model_internal::_doValidationCacheOfUser_name ;

        _model.model_internal::_user_nameIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isUser_nameAvailable && _internal_user_name == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "user_name is required"));
        }

        model_internal::_doValidationCacheOfUser_name = validationFailures;
        model_internal::_doValidationLastValOfUser_name = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfUser_role : Array = null;
    model_internal var _doValidationLastValOfUser_role : String;

    model_internal function _doValidationForUser_role(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfUser_role != null && model_internal::_doValidationLastValOfUser_role == value)
           return model_internal::_doValidationCacheOfUser_role ;

        _model.model_internal::_user_roleIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isUser_roleAvailable && _internal_user_role == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "user_role is required"));
        }

        model_internal::_doValidationCacheOfUser_role = validationFailures;
        model_internal::_doValidationLastValOfUser_role = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfUser_designation : Array = null;
    model_internal var _doValidationLastValOfUser_designation : String;

    model_internal function _doValidationForUser_designation(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfUser_designation != null && model_internal::_doValidationLastValOfUser_designation == value)
           return model_internal::_doValidationCacheOfUser_designation ;

        _model.model_internal::_user_designationIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isUser_designationAvailable && _internal_user_designation == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "user_designation is required"));
        }

        model_internal::_doValidationCacheOfUser_designation = validationFailures;
        model_internal::_doValidationLastValOfUser_designation = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfLogin_name : Array = null;
    model_internal var _doValidationLastValOfLogin_name : String;

    model_internal function _doValidationForLogin_name(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfLogin_name != null && model_internal::_doValidationLastValOfLogin_name == value)
           return model_internal::_doValidationCacheOfLogin_name ;

        _model.model_internal::_login_nameIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isLogin_nameAvailable && _internal_login_name == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "login_name is required"));
        }

        model_internal::_doValidationCacheOfLogin_name = validationFailures;
        model_internal::_doValidationLastValOfLogin_name = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfUser_password : Array = null;
    model_internal var _doValidationLastValOfUser_password : String;

    model_internal function _doValidationForUser_password(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfUser_password != null && model_internal::_doValidationLastValOfUser_password == value)
           return model_internal::_doValidationCacheOfUser_password ;

        _model.model_internal::_user_passwordIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isUser_passwordAvailable && _internal_user_password == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "user_password is required"));
        }

        model_internal::_doValidationCacheOfUser_password = validationFailures;
        model_internal::_doValidationLastValOfUser_password = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfUser_department : Array = null;
    model_internal var _doValidationLastValOfUser_department : String;

    model_internal function _doValidationForUser_department(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfUser_department != null && model_internal::_doValidationLastValOfUser_department == value)
           return model_internal::_doValidationCacheOfUser_department ;

        _model.model_internal::_user_departmentIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isUser_departmentAvailable && _internal_user_department == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "user_department is required"));
        }

        model_internal::_doValidationCacheOfUser_department = validationFailures;
        model_internal::_doValidationLastValOfUser_department = value;

        return validationFailures;
    }
    

}

}
